package com.zx.mes.hyl.controller;

import com.zx.mes.hyl.entity.Admin;
import com.zx.mes.hyl.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Admin controller
 * @author huayunlong
 * @date 2018-8-28
 */
@RestController
@RequestMapping("/admin")
public class AdminController {

    private AdminService adminService;

    @Autowired
    public AdminController(AdminService adminService) {
        this.adminService = adminService;
    }

    @GetMapping("/getOne")
    public Admin getOne(String id){
        return adminService.getOne(id);
    }
}
